<template>
  <div>
    <!--    {{active}}-->
    <el-steps :active="active" finish-status="success">
      <el-step title="基础信息"></el-step>
      <el-step title="权证信息"></el-step>
      <el-step title="面积及可租信息"></el-step>
      <el-step title="资产近照"></el-step>
    </el-steps>

    <el-button style="margin-top: 12px;" @click="next">下一步</el-button>
    <el-button style="margin-top: 12px;" @click="nextS">上一步</el-button>


    <el-row :gutter="15">
      <el-form ref="elForm" :model="dataForm" :rules="dataRule" label-position="right" label-width="160px" size="medium"

      >

        <div v-if="active == 0">

          <el-row>
            <!--         :disabled="judgeWrite('title')"-->
            <el-col :span="24" v-if="!setting.readonly"
            >
              <el-form-item label="流程标题"
                            prop="title"
              >
                <el-input v-model="dataForm.title" v-if="!setting.readonly"
                          placeholder="请输入" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.title || '-' }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="24" v-if="judgeShow('notes')"
            >
              <el-form-item label="变更说明"
                            prop="remarks"
              >
                <el-input v-model="dataForm.remarks" v-if="!setting.readonly"
                          placeholder="请输入"  :style='{"width":"100%"}' true
                          type="textarea" :autosize='{"minRows":4,"maxRows":4}'
                >

                </el-input>
                <el-input  v-if="setting.readonly" v-model="dataForm.remarks"
                           placeholder=""  :style='{"width":"100%"}' true
                           type="textarea" :autosize='{"minRows":4,"maxRows":4}'
                ></el-input>

                <!--                    <span class="value notes" v-if="setting.readonly">{{ dataForm.oldData.notes || '-' }}</span>-->
              </el-form-item>
            </el-col>

            <el-col :span="8" v-if="judgeShow('zcNumber')"
            >
              <el-form-item label="资产编号"
                            prop="zcNumber"
              >
                <el-input v-model="dataForm.zcNumber" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('zcNumber')" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.zcNumber || '-' }}</span>
              </el-form-item>
            </el-col>

            <el-col :span="8" v-if="judgeShow('zcName')"
            >
              <el-form-item label="资产名称"
                            prop="zcName"
              >
                <el-input v-model="dataForm.zcName" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('zcName')" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.zcName || '-' }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="judgeShow('zcLabel')"
            >
              <!--            <el-form-item label="资产标签"-->
              <!--                          prop="zcLabel"-->
              <!--            >-->
              <!--              <el-input v-model="dataForm.zcLabel" v-if="!setting.readonly"-->
              <!--                        placeholder="请输入" :disabled="judgeWrite('zcLabel')" clearable :style='{"width":"100%"}'-->
              <!--              >-->

              <!--              </el-input>-->
              <!--              <span class="value" v-if="setting.readonly">{{ dataForm.zcLabel || '-' }}</span>-->
              <!--            </el-form-item>-->

              <el-form-item label="资产类别"
                            prop="assetClass"
              >
                <el-select v-model="dataForm.assetClass" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('assetClass')" clearable :style='{"width":"100%"}'
                >
                  <el-option v-for="(item, index) in assetClassOptions" :key="index" :label="item.fullName"
                             :value="item.id" :disabled="item.disabled"
                  ></el-option>

                </el-select>
                <span class="value"
                      v-if="setting.readonly">{{ getOptionLabel(assetClassOptions, dataForm.assetClass) || '-' }}</span>
              </el-form-item>


            </el-col>
          </el-row>

          <el-row>
            <el-col :span="8" v-if="judgeShow('address')"
            >
              <el-form-item label="资产状态"
                            prop="zcStatus"
              >
                <el-select v-model="dataForm.zcStatus" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('zcNature')" clearable :style='{"width":"100%"}'
                >
                  <el-option v-for="(item, index) in zcStatusOptions" :key="index" :label="item.fullName"
                             :value="item.id" :disabled="item.disabled"
                  ></el-option>

                </el-select>
                <span class="value" v-if="setting.readonly">{{
                    getOptionLabel(zcNatureOptions, dataForm.zcNature) || '-'
                  }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="judgeShow('address')"
            >
              <el-form-item label="所属项目"
                            prop="belongingProject"
              >
                <el-input v-model="dataForm.belongingProject" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('belongingProject')" clearable
                          :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.belongingProject || '-' }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="judgeShow('address')"
            >
              <el-form-item label="取得价值"
                            prop="acquiringValue"
              >
                <el-input v-model="dataForm.acquiringValue" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('acquiringValue')" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.acquiringValue || '-' }}</span>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
            >
              <el-form-item label="取得日期"
                            prop="acquisitionDate"
              >
                <el-date-picker v-model=" dataForm.acquisitionDate"
                                placeholder="请选择" :disabled="judgeWrite('acquisitionDate')"
                                clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"

                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="judgeShow('address')"
            >
              <el-form-item label="现在估价"
                            prop="valuationNow"
              >
                <el-input v-model="dataForm.valuationNow" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('valuationNow')" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.valuationNow || '-' }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="judgeShow('address')"
            >
              <el-form-item label="详细地址"
                            prop="address"
              >
                <el-input v-model="dataForm.address" v-if="!setting.readonly"
                          placeholder="请输入" :disabled="judgeWrite('address')" clearable :style='{"width":"100%"}'
                >

                </el-input>
                <span class="value" v-if="setting.readonly">{{ dataForm.address || '-' }}</span>
              </el-form-item>
            </el-col>
            <!--          <el-col :span="8" v-if="judgeShow('zcNature')"-->
            <!--          >-->
            <!--            <el-form-item label="资产性质"-->
            <!--                          prop="zcNature"-->
            <!--            >-->
            <!--              <el-select v-model="dataForm.zcNature"  v-if="!setting.readonly"-->
            <!--                         placeholder="请选择" :disabled="judgeWrite('zcNature')" clearable :style='{"width":"100%"}'-->
            <!--              >-->
            <!--                <el-option v-for="(item, index) in zcNatureOptions" :key="index" :label="item.fullName"-->
            <!--                           :value="item.id" :disabled="item.disabled"-->
            <!--                ></el-option>-->

            <!--              </el-select>-->
            <!--              <span class="value" v-if="setting.readonly">{{ getOptionLabel(zcNatureOptions, dataForm.zcNature) || '-' }}</span>-->
            <!--            </el-form-item>-->
            <!--          </el-col>-->
          </el-row>

          <el-row>
            <el-col :span="6" v-if="judgeShow('zcPurpose')"
            >
              <el-form-item label="资产用途"
                            prop="zcPurpose"
              >
                <el-select v-model="dataForm.zcPurpose" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('zcPurpose')" clearable
                           :style='{"width":"100%"}'
                >
                  <el-option v-for="(item, index) in zcPurposeOptions" :key="index" :label="item.fullName"
                             :value="item.id" :disabled="item.disabled"
                  ></el-option>

                </el-select>
                <span class="value"
                      v-if="setting.readonly">{{ getOptionLabel(zcPurposeOptions, dataForm.zcPurpose) || '-' }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="6" v-if="judgeShow('zcSource')"
            >
              <el-form-item label="资产来源"
                            prop="zcSource"
              >
                <el-select v-model="dataForm.zcSource" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('zcSource')" clearable :style='{"width":"100%"}'
                >
                  <el-option v-for="(item, index) in zcSourceOptions" :key="index" :label="item.fullName"
                             :value="item.id" :disabled="item.disabled"
                  ></el-option>

                </el-select>
                <span class="value" v-if="setting.readonly">{{
                    getOptionLabel(zcSourceOptions, dataForm.zcSource) || '-'
                  }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="6" v-if="judgeShow('affiliatedUnit')"
            >
              <el-form-item label="权属单位"
                            prop="affiliatedUnit"
              >
                <el-select v-model="dataForm.affiliatedUnit" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('affiliatedUnit')" clearable
                           :style='{"width":"100%"}'
                >
                  <el-option v-for="(item, index) in affiliatedUnitOptions" :key="index" :label="item.fullName"
                             :value="item.id" :disabled="item.disabled"
                  ></el-option>

                </el-select>
                <span class="value" v-if="setting.readonly">{{
                    getOptionLabel(affiliatedUnitOptions, dataForm.affiliatedUnit) || '-'
                  }}</span>
              </el-form-item>
            </el-col>

          </el-row>


          <el-col :span="8" v-if="judgeShow('managementUnit')"
          >
            <el-form-item label="管理单位"
                          prop="managementUnit"
            >
              <el-select v-model="dataForm.managementUnit" v-if="!setting.readonly"
                         placeholder="请选择" :disabled="judgeWrite('managementUnit')" clearable
                         :style='{"width":"100%"}'
              >
                <el-option v-for="(item, index) in managementUnitOptions" :key="index" :label="item.fullName"
                           :value="item.id" :disabled="item.disabled"
                ></el-option>

              </el-select>
              <span class="value" v-if="setting.readonly">{{
                  getOptionLabel(managementUnitOptions, dataForm.managementUnit) || '-'
                }}</span>

            </el-form-item>
          </el-col>
          <el-col :span="6" v-if="judgeShow('zcAdmin')"
          >
            <el-form-item label="资产管理员"
                          prop="zcAdmin"
            >
              <user-select v-model="dataForm.zcAdmin" v-if="!setting.readonly"
                           placeholder="请选择" :disabled="judgeWrite('zcAdmin')" clearable
              >


              </user-select>
              <span class="value" v-if="setting.readonly">{{ dataForm.zcAdmin }}</span>

            </el-form-item>
          </el-col>
          <el-col :span="14" v-if="judgeShow('notes')"
          >
            <el-form-item label="备注"
                          prop="notes"
            >
              <el-input v-model="dataForm.notes" v-if="!setting.readonly"
                        placeholder="请输入" :disabled="judgeWrite('notes')" :style='{"width":"100%"}' true
                        type="textarea" :autosize='{"minRows":4,"maxRows":4}'
              >

              </el-input>
              <span class="value notes" v-if="setting.readonly">{{ dataForm.notes || '-' }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" v-if="judgeShow('zcFmImage')"
          >
            <el-form-item label="资产封面图片"
                          prop="zcFmImage"
            >
              <JNPF-UploadImg v-model="dataForm.zcFmImage"
                              :fileSize="10" :disabled="judgeWrite('zcFmImage')" sizeUnit="MB" :limit="9"
              >

              </JNPF-UploadImg>
            </el-form-item>
          </el-col>
          <el-col :span="6" v-if="judgeShow('zcFile')"
          >
            <el-form-item label="资产附件"
                          prop="zcFile"
            >
              <JNPF-UploadFz v-model="dataForm.zcFile"
                             :fileSize="10" :disabled="judgeWrite('zcFile')" sizeUnit="MB" :limit="9"
                             buttonText="点击上传"
              >

              </JNPF-UploadFz>
            </el-form-item>
          </el-col>
        </div>
        <div v-if="active == 1">
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')" :span="6"
          >
            <el-form-item label="产权性质"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
            >
              <el-select v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
                         :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')" :style='{"width":"100%"}'
                         clearable placeholder="请选择"
              >
                <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions" :key="index"
                           :disabled="item.disabled" :label="item.fullName" :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')" :span="6"
          >
            <el-form-item label="权证号"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')" :style='{"width":"100%"}'
                        clearable placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_landUse')" :span="6"
          >
            <el-form-item label="证载土地用途"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_landUse"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_landUse"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_landUse')" :style='{"width":"100%"}' clearable
                        placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_housePurpose')" :span="6"
          >
            <el-form-item label="证载房屋用途"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_housePurpose"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_housePurpose')" :style='{"width":"100%"}'
                        clearable placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner')" :span="6"
          >
            <el-form-item label="证载产权人"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner')" :style='{"width":"100%"}'
                        clearable placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner')" :span="6"
          >
            <el-form-item label="现状产权人"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner')" :style='{"width":"100%"}'
                        clearable placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_address')" :span="6"
          >
            <el-form-item label="证载地址"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_address"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_address"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_address')" :style='{"width":"100%"}' clearable
                        placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_useNature')" :span="6"
          >
            <el-form-item label="土地使用权性质"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_useNature"
            >
              <el-select v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature"
                         :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_useNature')" :style='{"width":"100%"}'
                         clearable placeholder="请选择"
              >
                <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions" :key="index"
                           :disabled="item.disabled" :label="item.fullName" :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_buildings')" :span="6"
          >
            <el-form-item label="幢数"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_buildings"
            >
              <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_buildings"
                               :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_buildings')" :step="1"
                               placeholder="数字文本"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_layers')" :span="6"
          >
            <el-form-item label="总层数"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_layers"
            >
              <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_layers"
                               :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_layers')" :step="1"
                               placeholder="数字文本"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_numberFloors')" :span="6"
          >
            <el-form-item label="所在层数"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_numberFloors"
            >
              <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors"
                               :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_numberFloors')"
                               :step="1" placeholder="数字文本"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_startTime')" :span="6"
          >
            <el-form-item label="开始使用时间"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_startTime"
            >
              <el-date-picker v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_startTime"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_startTime')" :style='{"width":"100%"}'
                              clearable format="yyyy-MM-dd" placeholder="请选择" type="date"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_endTime')" :span="6"
          >
            <el-form-item label="使用到期时间"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_endTime"
            >
              <el-date-picker v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_endTime"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_endTime')" :style='{"width":"100%"}'
                              clearable format="yyyy-MM-dd" placeholder="请选择" type="date"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')" :span="6"
          >
            <el-form-item label="发证时间"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime"
            >
              <el-date-picker v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')" :style='{"width":"100%"}'
                              clearable format="yyyy-MM-dd" placeholder="请选择" type="date"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation')" :span="6"
          >
            <el-form-item label="权证保管地"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation"
                        :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation')" :style='{"width":"100%"}'
                        clearable placeholder="请输入"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_notes')" :span="8"
          >
            <el-form-item label="备注"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_notes"
            >
              <el-input v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_notes"
                        :autosize='{"minRows":4,"maxRows":4}' :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_notes')"
                        :style='{"width":"100%"}' placeholder="请输入" true type="textarea"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')" :span="6"
          >
            <el-form-item label="产证附件"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
            >
              <JNPF-UploadFz v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
                             :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')" :fileSize="10"
                             :limit="9" buttonText="点击上传" sizeUnit="MB"
              >
              </JNPF-UploadFz>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_productionImage')" :span="6"
          >
            <el-form-item label="产证图片"
                          prop="jnpf_zcgl_zcdj_warrant_jnpf_productionImage"
            >
              <JNPF-UploadImg v-model=" dataForm.jnpf_zcgl_zcdj_warrant_jnpf_productionImage"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_productionImage')" :fileSize="10"
                              :limit="9" sizeUnit="MB"
              >
              </JNPF-UploadImg>
            </el-form-item>
          </el-col>
        </div>
        <div v-if="active== 2">
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingArea')" :span="8"
          >
            <el-form-item label="证载建筑面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_buildingArea"
            >
              <el-input-number  v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea"  :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingArea')"
                               :step="1" placeholder="数字文本"
                               @input="check(1,dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landArea')" :span="8"
          >
            <el-form-item label="证载土地面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_landArea"
            >
              <el-input-number  v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea"    :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landArea')"
                               :step="1" placeholder="数字文本"
                               @input="check(2,dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')" :span="8"
          >
            <el-form-item label="证载共有土地面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_sharedLandArea"
            >
              <el-input-number  v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')"
                               :step="1"
                               placeholder="数字文本" @input="check(3,dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')" :span="8"
          >
            <el-form-item label="建筑测量面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea"
            >
              <el-input-number  v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')"
                               :step="1"
                               placeholder="数字文本"
                               @input="check(4,dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')" :span="8"
          >
            <el-form-item label="土地测量面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_landSurveyArea"
            >
              <el-input-number  v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea"  :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')"
                               :step="1"
                               placeholder="数字文本" @input="check(5,dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')" :span="8"
          >
            <el-form-item label="独用面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"
            >
              <el-input-number    v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"  :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')"
                               :step="1" placeholder="数字文本"
                               @input="check(6,dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedArea')" :span="6"
          >
            <el-form-item label="分摊面积"
                          prop="jnpf_zcgl_zcdj_area_jnpf_sharedArea"
            >
              <el-input-number   v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedArea')"
                               :step="1" placeholder="数字文本"
                               @input="check(7,dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea)"
              >
              </el-input-number>
            </el-form-item>
          </el-col>
        </div>


        <div v-if="active==3">
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')" :span="8"
          >
            <el-form-item label="近照日期"
                          prop="jnpf_zcgl_zcdj_photo_jnpf_photoTime"
            >
              <el-date-picker v-model=" dataForm.jnpf_zcgl_zcdj_photo_jnpf_photoTime"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoTime')" :style='{"width":"100%"}'
                              clearable format="yyyy-MM-dd" placeholder="请选择" type="date"
                              value-format="timestamp"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoImage')" :span="24"
          >
            <el-form-item label="近照图片"
                          prop="jnpf_zcgl_zcdj_photo_jnpf_photoImage"
            >
              <JNPF-UploadImg v-model=" dataForm.jnpf_zcgl_zcdj_photo_jnpf_photoImage"
                              :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoImage')" :fileSize="10"
                              :limit="9" sizeUnit="MB"
              >
              </JNPF-UploadImg>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label-width="0">
              <JNPF-Text :closable="false"
                         :style='{"width":"100%"}'
                         :textStyle='{"color":"#CCAEAE","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}' value="注:最多上传五张图片,单张图片最大支持10M、支持png/jpg/jpeg/gif格式"
              >
              </JNPF-Text>
            </el-form-item>
          </el-col>
        </div>
        <!--        <template v-if="!loading && formOperates">-->
        <!--          <el-col :span="24">-->
        <!--            <el-tabs v-model="activeremygj" tab-position="top" class="mb-20">-->
        <!--              <el-tab-pane label="基础信息">-->
        <!--              </el-tab-pane>-->
        <!--              <el-tab-pane label="权证信息">-->
        <!--              </el-tab-pane>-->
        <!--              <el-tab-pane label="面积及可租信息">-->
        <!--              </el-tab-pane>-->
        <!--              <el-tab-pane label="资产近照">-->
        <!--                -->
        <!--              </el-tab-pane>-->
        <!--            </el-tabs>-->
        <!--          </el-col>-->
        <!--        </template>-->
      </el-form>
    </el-row>
    <!-- 固定在底部的div -->
    <div v-show="!flag" class="fixed-bottom">
      <div class="content">

        <span>可拆分证载建筑面积：{{max_jnpf_zcgl_zcdj_area_jnpf_buildingArea}}㎡</span>
        <span>可拆分证载土地面积：{{max_jnpf_zcgl_zcdj_area_jnpf_landArea }}㎡</span>
        <span>可拆分证载共有土地面积：{{max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea}}㎡</span>
        <span>可拆分建筑测量面积：{{max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea}}㎡</span>
        <span>可拆分土地测量面积：{{max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea}}㎡</span>
        <span>可拆分独用面积：{{max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea}}㎡</span>
        <span>可拆分分摊面积：{{max_jnpf_jnpf_zcdj_area_jnpf_sharedArea}}㎡</span>
      </div>
    </div>
    <UserBox v-if="userBoxVisible" ref="userBox" @submit="submit"/>
  </div>
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'

export default {
  components: {},
  props: [],
  data() {
    return {
      flag:false,
      max_jnpf_zcgl_zcdj_area_jnpf_buildingArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_landArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea:0,
      max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea:0,
      max_jnpf_jnpf_zcdj_area_jnpf_sharedArea:0,
      active: 0,
      visible: false,
      loading: false,
      setting: {},
      eventType: '',
      userBoxVisible: false,
      currTableConf: {},
      addTableConf: {},
      tableRows: {},
      dataForm: {
        title: '',
        id: '',
        remarks: '',
        flowId: '',
        status: 1,
        freeapproveruserid: '',
        flowUrgent: 1,
        zcNumber: undefined,
        zcName: undefined,
        zcLabel: undefined,
        address: undefined,
        zcNature: undefined,
        zcPurpose: undefined,
        zcSource: undefined,
        affiliatedUnit: undefined,
        managementUnit: undefined,
        zcAdmin: undefined,
        notes: undefined,
        zcFmImage: [],
        zcFile: [],
        zcgl_zcdj_area:
          {
            buildingArea: '',
            landArea: '',
            sharedLandArea: '',
            buildingMeasurementArea: '',
            landSurveyArea: '',
            exclusiveArea: '',
            sharedArea: ''
          },
        zcgl_zcdj_warrant:
          {
            propertyRight: '',
            warrantNumber: '',
            landUse: '',
            housePurpose: '',
            zzPropertyOwner: '',
            xzPropertyOwner: '',
            address: '',
            useNature: '',
            buildings: '',
            layers: '',
            numberFloors: '',
            startTime: '',
            endTime: '',
            issuanceTime: '',
            custodyLocation: '',
            notes: '',
            productionFile: '',
            productionImage: ''
          },
        zcgl_zcdj_photo:
          {
            photoTime: '',
            photoImage: ''
          },
        jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
        jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
        jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
        jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
        jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_address: '',
        jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
        jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
        jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
        jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
        jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
        jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
        jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
        jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoImage: []
      },
      tableRequiredData: {},
      activeremygj: '2',
      dataRule:
        {
          zcNumber: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          zcName: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          address: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          zcNature: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          zcSource: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          affiliatedUnit: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          managementUnit: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],

          jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          jnpf_zcgl_zcdj_photo_jnpf_photoTime: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          jnpf_zcgl_zcdj_photo_jnpf_photoImage: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'click'
            }
          ]

        },
      zcNatureOptions: [],
      zcPurposeOptions: [],
      zcSourceOptions: [],
      affiliatedUnitOptions: [],
      managementUnitOptions: [],

      jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions: []
    }
  },
  computed: {
    formOperates() {
      return this.setting.formOperates
    }
  },
  watch: {},
  created() {
    this.getzcStatus()
    this.getassetClassOptions()
    this.getzcPurposeOptions()
    this.getzcSourceOptions()
    this.getaffiliatedUnitOptions()
    this.getmanagementUnitOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions()
  },
  mounted() {
  },
  methods: {
    // 获取选项标签
    getOptionLabel(options, value) {
      const item = options.find(opt => opt.id === value);
      return item ? item.fullName : '';
    },
    getzcStatus() {
      getDictionaryDataSelector('610000000000000000').then(res => {
        this.zcStatusOptions = res.data.list
      })
    },
    getassetClassOptions() {
      getDictionaryDataSelector('610000000000000001').then(res => {
        this.assetClassOptions = res.data.list
      })
    },
    check(type,value){
      if(!flag){

        if(type == 1){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea){
            this.$message({
              message:"拆分面积不能大于父体证载建筑面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea = ''
          }
        }

        if(type == 2){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_landArea){
            this.$message({
              message:"拆分面积不能大于父体证载土地面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea = ''
          }
        }
        if(type == 3){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea){
            this.$message({
              message:"拆分面积不能大于证载共有土地面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = ''
          }
        }

        if(type == 4){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea){
            this.$message({
              message:"拆分面积不能大于建筑测量面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = ''
          }
        }
        if(type == 5){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea){
            this.$message({
              message:"拆分面积不能大于土地测量面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = ''
          }
        }
        if(type == 6){
          if(value>this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea){
            this.$message({
              message:"拆分面积不能大于独用面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = ''
          }
        }

        if(type == 7){
          if(value>this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea){
            this.$message({
              message:"拆分面积不能大于分摊面积",
              type: 'error',
              duration: 1000
            })
            this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea = ''
          }
        }
      }

    },

    validateRequiredFields(dataForm, fields, content) {
      if (!dataForm[fields] || dataForm[fields] === '') {

        this.$message({
          message: `请填写${content}`,
          type: 'error',
          duration: 1000
        })
        return false
      }
    },

    nextS() {

      if (this.active-- < 1) this.active = 0
    },

    next() {
      //校验必填值
      if (this.active == 0) {
        if (this.validateRequiredFields(this.dataForm, 'zcName', '资产名称') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'address', '资产地址') == false) {
          return
        }

        if (this.validateRequiredFields(this.dataForm, 'zcSource', '资产来源') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'affiliatedUnit', 'affiliatedUnit') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'managementUnit', '管理单位') == false) {
          return
        }
      }

      if (this.active == 1) {
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_propertyRight', '产权性质') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_startTime', '开始使用时间') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_endTime', '结束使用时间') == false) {
          return
        }

      }

      if (this.active == 2) {
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_sharedLandArea', '证载共有土地面积') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea', '建筑测量面积') == false) {
          return
        }


      }


      if (this.active++ > 2) this.active = 0
    },
    judgeShow(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return true
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return item.read
    },
    judgeWrite(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return false
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return !item.write
    },
    getzcNatureOptions() {
      getDictionaryDataSelector('610823452110094661').then(res => {
        this.zcNatureOptions = res.data.list
      })
    },
    getzcPurposeOptions() {
      getDictionaryDataSelector('610823865056100677').then(res => {
        this.zcPurposeOptions = res.data.list
      })
    },
    getzcSourceOptions() {
      getDictionaryDataSelector('610823965094445381').then(res => {
        this.zcSourceOptions = res.data.list
      })
    },
    getaffiliatedUnitOptions() {
      getDictionaryDataSelector('610824055188095301').then(res => {
        this.affiliatedUnitOptions = res.data.list
      })
    },
    getmanagementUnitOptions() {
      getDictionaryDataSelector('610824142995849541').then(res => {
        this.managementUnitOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions() {
      getDictionaryDataSelector('610826202277478725').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions() {
      getDictionaryDataSelector('610826295164535109').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions = res.data.list
      })
    },
    goBack() {
      this.$emit('refresh')
    },
    init(data) {
      this.dataForm.id = data.id || ''
      this.setting = data
      this.visible = true
      this.updateDataRule()

      if (data.flowTaskInfo != null) {
        this.flag = true
        console.log(data.flowTaskInfo)

        this.dataInfo3(data.flowTaskInfo.flowFormContentJson)
        this.$emit('setPageLoad')
        this.$store.commit('generator/UPDATE_RELATION_DATA', {})
        this.loading = false
        // this.dataForm.id = data.id || "";
        this.setting = data
        if (data.flowTaskInfo != null) {

          this.setting['readonly'] = true

        }

        // this.visible = true;
        this.updateDataRule()
        this.$forceUpdate()

      }else{
        this.$nextTick(() => {
          this.$refs['elForm'].resetFields()
          if (this.dataForm.id) {

            this.loading = true
            request({
              url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
              method: 'get'
            }).then(res => {

              this.dataInfo(res.data)
              this.loading = false
            })
          }
          this.$emit('setPageLoad')
        })
      }


      this.$store.commit('generator/UPDATE_RELATION_DATA', {})
    },
    updateDataRule() {
      let newRules = {}
      for (let i = 0; i < this.setting.formOperates.length; i++) {
        const item = this.setting.formOperates[i]
        if (!item.id.includes('-')) {
          const newRulesItem = {
            required: item.required,
            message: item.name + '不能为空',
            trigger: item.trigger || 'blur'
          }
          if (!this.dataRule.hasOwnProperty(item.id)) {
            if (item.required) this.$set(newRules, item.id, [newRulesItem])
          } else {
            let withoutRequiredItem = true
            for (let i = 0; i < this.dataRule[item.id].length; i++) {
              if (this.dataRule[item.id][i].hasOwnProperty('required')) {
                this.dataRule[item.id][i].required = item.required
                withoutRequiredItem = false
              }
            }
            if (withoutRequiredItem && item.required) this.dataRule[item.id].push(newRulesItem)
          }
        } else {
          let key = item.id.split('-')[0]
          let newId = item.id.split('-')[1]
          let newItem = {
            ...item,
            id: newId
          }
          if (!this.tableRequiredData.hasOwnProperty(key)) {
            this.$set(this.tableRequiredData, key, [newItem])
          } else {
            this.tableRequiredData[key].push(newItem)
          }
        }
      }
      this.dataRule = { ...this.dataRule, ...newRules }
    },
    exist() {
      let isOk = true
      for (let key in this.tableRequiredData) {
        if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
          for (let i = 0; i < this.dataForm[key].length; i++) {
            let item = this.dataForm[key][i]
            inner: for (let id in item) {
              let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
              if (!arr.length) continue inner
              if (arr[0].required) {
                let msg = `${arr[0].name}不能为空`
                let boo = true
                if (arr[0].dataType === 'array') {
                  boo = !this.jnpf.isEmptyArray(item[id])
                } else {
                  boo = !this.jnpf.isEmpty(item[id])
                }
                if (!boo) {
                  this.$message({
                    message: msg,
                    type: 'error',
                    duration: 1000
                  })
                  isOk = false
                  break
                }
              }
            }
          }
        }
      }
      return isOk
    },
    judgeRequired(id) {
      if (!this.formOperates || !this.formOperates.length) return false
      let arr = this.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return false
      let item = arr[0]
      return item.required
    },
    // 表单提交
    dataFormSubmit(eventType, flowUrgent) {
      this.$refs['elForm'].validate((valid) => {
        if (valid) {
          if (this.exist && !this.exist()) return
          if (eventType === 'audit' || eventType === 'reject') {
            this.$emit('eventReceiver', this.dataForm, eventType)
            return
          }
          this.dataForm.status = eventType === 'submit' ? 0 : 1
          this.dataForm.flowId = this.setting.flowId
          this.dataForm.flowUrgent = flowUrgent
          this.eventType = eventType
          if (this.eventType === 'submit') {
            this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
              type: 'warning'
            }).then(() => {
              this.request()
            }).catch(() => {
            })
          } else {
            this.request()
          }
        }
      })
    },
    request() {
      var _data = this.dataList()
      var id = this.dataForm.id
      delete this.dataForm.id
      _data.type = '5'
      _data.zcdgId = id
      //转换
      this.dataForm.zcgl_zcdj_area.buildingArea =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      this.dataForm.zcgl_zcdj_area.landArea   =  this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea
      this.dataForm.zcgl_zcdj_area.sharedLandArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      this.dataForm.zcgl_zcdj_area.buildingMeasurementArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      this.dataForm.zcgl_zcdj_area.landSurveyArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      this.dataForm.zcgl_zcdj_area.exclusiveArea   =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      this.dataForm.zcgl_zcdj_area.sharedArea    =    this.dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea
      _data.newData = this.dataForm




      if (!this.dataForm.id) {
        request({
          url: '/api/example/ZcglZcdjInfoChange',
          method: 'post',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      } else {
        request({
          url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
          method: 'PUT',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      }
    },
    openSelectDialog(key) {
      this.currTableConf = this.addTableConf[key]
      this.currVmodel = key
      this.selectDialogVisible = true
      this.$nextTick(() => {
        this.$refs.selectDialog.init()
      })
    },
    addForSelect(data) {
      for (let i = 0; i < data.length; i++) {
        let item = { ...this.tableRows[this.currVmodel], ...data[i] }
        this.dataForm[this.currVmodel].push(item)
      }
    },
    dataList() {
      var _data = JSON.parse(JSON.stringify(this.dataForm))

      _data.zcFmImage = JSON.stringify(_data.zcFmImage)

      _data.zcFile = JSON.stringify(_data.zcFile)

      _data.zcgl_zcdj_warrant.propertyRight = _data.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight
      _data.zcgl_zcdj_warrant.warrantNumber = _data.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber
      _data.zcgl_zcdj_warrant.landUse = _data.jnpf_zcgl_zcdj_warrant_jnpf_landUse
      _data.zcgl_zcdj_warrant.housePurpose = _data.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose
      _data.zcgl_zcdj_warrant.zzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner
      _data.zcgl_zcdj_warrant.xzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner
      _data.zcgl_zcdj_warrant.address = _data.jnpf_zcgl_zcdj_warrant_jnpf_address
      _data.zcgl_zcdj_warrant.useNature = _data.jnpf_zcgl_zcdj_warrant_jnpf_useNature
      _data.zcgl_zcdj_warrant.buildings = _data.jnpf_zcgl_zcdj_warrant_jnpf_buildings
      _data.zcgl_zcdj_warrant.layers = _data.jnpf_zcgl_zcdj_warrant_jnpf_layers
      _data.zcgl_zcdj_warrant.numberFloors = _data.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors
      _data.zcgl_zcdj_warrant.startTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_startTime
      _data.zcgl_zcdj_warrant.endTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_endTime
      _data.zcgl_zcdj_warrant.issuanceTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime
      _data.zcgl_zcdj_warrant.custodyLocation = _data.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation
      _data.zcgl_zcdj_warrant.notes = _data.jnpf_zcgl_zcdj_warrant_jnpf_notes
      _data.zcgl_zcdj_warrant.productionFile = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionFile)
      _data.zcgl_zcdj_warrant.productionImage = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionImage)
      _data.zcgl_zcdj_area.buildingArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      _data.zcgl_zcdj_area.landArea = _data.jnpf_zcgl_zcdj_area_jnpf_landArea
      _data.zcgl_zcdj_area.sharedLandArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      _data.zcgl_zcdj_area.buildingMeasurementArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      _data.zcgl_zcdj_area.landSurveyArea = _data.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      _data.zcgl_zcdj_area.exclusiveArea = _data.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      _data.zcgl_zcdj_area.sharedArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedArea
      _data.zcgl_zcdj_photo.photoTime = _data.jnpf_zcgl_zcdj_photo_jnpf_photoTime
      _data.zcgl_zcdj_photo.photoImage = JSON.stringify(_data.jnpf_zcgl_zcdj_photo_jnpf_photoImage)
      return _data
    },
    dataInfo(dataAll) {
      let _dataAll = dataAll
      _dataAll.zcFmImage = JSON.parse(_dataAll.zcFmImage)
      _dataAll.zcFile = JSON.parse(_dataAll.zcFile)
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight = _dataAll.zcgl_zcdj_warrant.propertyRight
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber = _dataAll.zcgl_zcdj_warrant.warrantNumber
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_landUse = _dataAll.zcgl_zcdj_warrant.landUse
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose = _dataAll.zcgl_zcdj_warrant.housePurpose
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner = _dataAll.zcgl_zcdj_warrant.zzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner = _dataAll.zcgl_zcdj_warrant.xzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_address = _dataAll.zcgl_zcdj_warrant.address
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_useNature = _dataAll.zcgl_zcdj_warrant.useNature
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_buildings = _dataAll.zcgl_zcdj_warrant.buildings
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_layers = _dataAll.zcgl_zcdj_warrant.layers
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors = _dataAll.zcgl_zcdj_warrant.numberFloors
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_startTime = _dataAll.zcgl_zcdj_warrant.startTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_endTime = _dataAll.zcgl_zcdj_warrant.endTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime = _dataAll.zcgl_zcdj_warrant.issuanceTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation = _dataAll.zcgl_zcdj_warrant.custodyLocation
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_notes = _dataAll.zcgl_zcdj_warrant.notes

      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionFile = _dataAll.zcgl_zcdj_warrant.productionFile ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionFile) : []
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionImage = _dataAll.zcgl_zcdj_warrant.productionImage ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionImage) : []
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea = _dataAll.zcgl_zcdj_area.buildingArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea = _dataAll.zcgl_zcdj_area.landArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = _dataAll.zcgl_zcdj_area.sharedLandArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = _dataAll.zcgl_zcdj_area.buildingMeasurementArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = _dataAll.zcgl_zcdj_area.landSurveyArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = _dataAll.zcgl_zcdj_area.exclusiveArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea = _dataAll.zcgl_zcdj_area.sharedArea
      _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoTime = _dataAll.zcgl_zcdj_photo.photoTime

      _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = _dataAll.zcgl_zcdj_photo.photoImage ? JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage) : []

      _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage)

      this.max_jnpf_zcgl_zcdj_area_jnpf_buildingArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_landArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      this.max_jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      this.max_jnpf_jnpf_zcdj_area_jnpf_sharedArea = _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea


      this.dataForm = _dataAll
    },
    dataInfo3(dataAll) {

      let _dataAll = JSON.parse(dataAll)


      function safeParseJSON(data) {
        try {
          return typeof data === 'string' ? JSON.parse(data) : data
        } catch (e) {
          console.error('Parsing error:', e)
          return null // 或者根据需要返回其他默认值
        }
      }

// 处理 newData 中的 zcFile 和 zcFmImage
      if (_dataAll.newData) {
        let newDataParsed = safeParseJSON(_dataAll.newData)
        if (newDataParsed) {
          if (newDataParsed.zcFile != '') {
            newDataParsed.zcFile = newDataParsed.zcFile ? JSON.stringify(newDataParsed.zcFile) : []

          }
          if (newDataParsed.zcFmImage != '') {
            newDataParsed.zcFmImage = newDataParsed.zcFmImage ? JSON.stringify(newDataParsed.zcFmImage) : []

          }

        }
      }

      this.dataForm = _dataAll
      if (typeof this.dataForm.newData === 'string') {
        this.dataForm.newData = JSON.parse(this.dataForm.newData)
      } else {
        this.dataForm.newData = this.dataForm.newData
      }


      this.dataForm = this.dataForm.newData

      // this.dataFormNew = JSON.parse(JSON.stringify(this.dataForm))
    },
  }
}

</script>
<style scoped>
/* 容器样式 */
.container {
  position: relative;
  min-height: 100vh; /* 确保容器高度占满整个视口 */
}

/* 长内容区域，用于测试滚动 */
.long-content {
  padding-bottom: 60px; /* 为底部div留出空间 */
}

/* 固定在底部的div */
.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px; /* 高度设置为60px */
  background-color: #f5f5f5; /* 背景色 */
  border-top: 1px solid #ddd; /* 顶部边框 */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* 确保在最上层 */
}

/* 内容样式 */
.content {
  display: flex;
  gap: 20px; /* 设置文字之间的间距 */
  font-family: Arial, sans-serif;
  color: #333;
  white-space: nowrap; /* 确保文字不换行 */
  overflow-x: auto; /* 如果内容超出宽度，允许横向滚动 */
  padding: 0 20px; /* 左右内边距 */
}

.content span {
  font-size: 1em; /* 字体大小 */
  font-weight: bold; /* 字体加粗 */
}
.el-textarea.is-disabled .el-textarea__inner {

  color: black !important;
}

.el-input.is-disabled .el-input__inner {
  color: black !important;

}

/deep/ .el-input__inner {
  background: white !important;

}

/deep/ .el-textarea__inner {
  background: white !important;
}

.el-input.is-disabled .el-input__inner {

  background: white !important;
}
</style>
